
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class RECEIVED_MESSAGEMap : EntityTypeConfiguration<RECEIVED_MESSAGE>
    {
        public RECEIVED_MESSAGEMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.TEL_NO)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.Message_body)
                .IsRequired()
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("RECEIVED_MESSAGE");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.TEL_NO).HasColumnName("TEL_NO");
            this.Property(t => t.Message_body).HasColumnName("Message_body");
            this.Property(t => t.CREATED_DATE).HasColumnName("CREATED_DATE");
        }
    }
}
